package com.dd.common.utils;

import com.dd.common.constans.TokenConstantKey;

import javax.servlet.http.HttpServletRequest;

public class HttpUtils {

    public static String anasyUserId(HttpServletRequest request){

        String token = request.getHeader(TokenConstantKey.TOKEN_KEY);
        String userId = JwtUtil.analysisToken(token);

        return  userId;
    }


    public static String anasyUserName(HttpServletRequest request){

        String token = request.getHeader(TokenConstantKey.TOKEN_KEY);
        String username = JwtUtil.analysisUserToken(token);

        return  username;
    }
}
